package com.yanqu.road.entity.enums;

public enum eALiActivityChannel {

    //部分活动渠道
    All(0, "", ""),

    //瓜分活动
    GuanFen(1, "jwdzg_game_shengji_5_guafen", "guafen"),

    ;

    //活动渠道
    //对应condition params one
    private int channel;

    private String code;

    private String value;

    eALiActivityChannel(int channel, String code, String value) {
        this.channel = channel;
        this.code = code;
        this.value = value;
    }

    public int getChannel() {
        return channel;
    }

    public String getValue() {
        return value;
    }

    public static String getALiActivityChannelValue(int channelType){
        for(eALiActivityChannel data:values()){
            if(data.getChannel() == channelType){
                return data.getValue();
            }
        }
        return All.getValue();
    }

    public static String getALiActivityChannelCode(int channelType){
        for(eALiActivityChannel data:values()){
            if(data.getChannel() == channelType){
                return data.getCode();
            }
        }
        return All.getCode();
    }

    public static eALiActivityChannel eALiActivityChannel(int channelType){
        for(eALiActivityChannel data:values()){
            if(data.getChannel() == channelType){
                return data;
            }
        }
        return All;
    }

    public String getCode() {
        return code;
    }
}
